package br.usp.trabalho.sd.master;

import java.io.Serializable;


public class ServerNode implements Serializable
{
    private static final long serialVersionUID = 878234581004146620L;

    public final String name;
    public final String ip;

    private boolean mBusy;


    public ServerNode(String name, String ip)
    {
        this.name = name;
        this.ip = ip;
        this.mBusy = false;
    }

    public boolean isBusy()              { return mBusy; }
    public void    setBusy(boolean busy) { this.mBusy = busy; }


    @Override
    public boolean equals(Object obj)
    {
        if (obj instanceof ServerNode)
        {
            ServerNode n = (ServerNode) obj;
            return  n.name.equals(this.name) &&
                    n.ip.equals(this.ip);
        }
        return false;
    }
}
